home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / standard / hypot.z / hypot
Encoding:
Text File  |  1998-10-30  |  6.1 KB  |  133 lines

  1.  
  2.  
  3.  
  4. HHHHYYYYPPPPOOOOTTTT((((3333MMMM))))                                                            HHHHYYYYPPPPOOOOTTTT((((3333MMMM))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      hypot, hypotf, fhypot, hypotl, cabs, cabsf, fcabs, cabsl - Euclidean
  10.      distance, complex absolute value
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<mmmmaaaatttthhhh....hhhh>>>>
  14.  
  15.      ddddoooouuuubbbblllleeee hhhhyyyyppppooootttt ((((ddddoooouuuubbbblllleeee xxxx,,,, ddddoooouuuubbbblllleeee yyyy))));;;;
  16.      ffffllllooooaaaatttt ffffhhhhyyyyppppooootttt ((((ffffllllooooaaaatttt xxxx,,,, ffffllllooooaaaatttt yyyy))));;;;
  17.      ffffllllooooaaaatttt hhhhyyyyppppoooottttffff ((((ffffllllooooaaaatttt xxxx,,,, ffffllllooooaaaatttt yyyy))));;;;
  18.      lllloooonnnngggg ddddoooouuuubbbblllleeee hhhhyyyyppppoooottttllll ((((lllloooonnnngggg ddddoooouuuubbbblllleeee xxxx,,,, lllloooonnnngggg ddddoooouuuubbbblllleeee yyyy))));;;;
  19.  
  20.      ddddoooouuuubbbblllleeee ccccaaaabbbbssss ((((ssssttttrrrruuuucccctttt {{{{ ddddoooouuuubbbblllleeee aaaa,,,,bbbb;;;; }}}} zzzz))));;;;
  21.      ffffllllooooaaaatttt ffffccccaaaabbbbssss ((((ssssttttrrrruuuucccctttt {{{{ ffffllllooooaaaatttt aaaa,,,,bbbb;;;; }}}} zzzz))));;;;
  22.      ffffllllooooaaaatttt ccccaaaabbbbssssffff ((((ssssttttrrrruuuucccctttt {{{{ ffffllllooooaaaatttt aaaa,,,,bbbb;;;; }}}} zzzz))));;;;
  23.      lllloooonnnngggg ddddoooouuuubbbblllleeee ccccaaaabbbbssssllll ((((ssssttttrrrruuuucccctttt {{{{ lllloooonnnngggg ddddoooouuuubbbblllleeee aaaa,,,,bbbb;;;; }}}} zzzz))));;;;
  24.  
  25. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  26.      _h_y_p_o_t(_x,_y), _f_h_y_p_o_t(_x,_y), _h_y_p_o_t_f(_x,_y), _h_y_p_o_t_l(_x,_y), _c_a_b_s(_x,_y), _f_c_a_b_s(_x,_y),
  27.      _c_a_b_s_f(_x,_y), and _c_a_b_s_l(_x,_y) return sqrt(x*x+y*y) computed in such a way
  28.      that overflow will not happen, and underflow occurs only if the final
  29.      result deserves it.
  30.  
  31.      _f_h_y_p_o_t, _h_y_p_o_t_f, _f_c_a_b_s, and _c_a_b_s_f are the same functions as _h_y_p_o_t and _c_a_b_s
  32.      but for the float data type.
  33.  
  34.      _h_y_p_o_t_l, and _c_a_b_s_l are the same functions as _h_y_p_o_t and _c_a_b_s but for the
  35.      long double data type.
  36.  
  37. DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  38.      In the diagnostics below, functions in the standard math library _l_i_b_m._a,
  39.      are referred to as -_l_m versions, those in _l_i_b_m_x._a are referred to as -_l_m_x
  40.      versions, and those in the the BSD math library _l_i_b_m_4_3._a, are referred to
  41.      as -_l_m_4_3 versions.  The -_l_m _a_n_d -_l_m_x versions always return the default
  42.      Quiet NaN and set _e_r_r_n_o to EDOM when a NaN is used as an argument.  A NaN
  43.      argument causes the -_l_m_4_3 versions of the _h_y_p_o_t functions to return the
  44.      same NaN, unless the other argument is HUGE_VAL, in which case HUGE_VAL
  45.      is returned.  The -_l_m_4_3 versions never set _e_r_r_n_o.  The value of HUGE_VAL
  46.      is IEEE Infinity.
  47.  
  48.      When the correct value would overflow, the _h_y_p_o_t functions return
  49.      HUGE_VAL  The -_l_m _a_n_d -_l_m_x versions also set _e_r_r_n_o to ERANGE.  See
  50.      matherr(3M) for a description of error handling for -_l_m_x functions.
  51.  
  52. NNNNOOOOTTTTEEEESSSS
  53.      Long double operations on this system are only supported in round to
  54.      nearest rounding mode (the default).  The system must be in round to
  55.      nearest rounding mode when calling any of the long double functions, or
  56.      incorrect answers will result.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. HHHHYYYYPPPPOOOOTTTT((((3333MMMM))))                                                            HHHHYYYYPPPPOOOOTTTT((((3333MMMM))))
  71.  
  72.  
  73.  
  74.      Users concerned with portability to other computer systems should note
  75.      that the long double and float versions of these functions are optional
  76.      according to the ANSI C Programming Language Specification ISO/IEC 9899 :
  77.      1990 (E).
  78.  
  79.      Long double functions have been renamed to be compliant with the ANSI-C
  80.      standard, however to be backward compatible, they may still be called
  81.      with the double precision function name prefixed with a q.
  82.  
  83.      hypot and cabs are not ANSI-C functions.  If you compile with flag -ansi,
  84.      you must supply your own prototypes for these functions or you will get
  85.      incorrect results.  (See the prototypes defined in /usr/include/math.h)
  86.  
  87. EEEERRRRRRRROOOORRRR ((((dddduuuueeee ttttoooo RRRRoooouuuunnnnddddooooffffffff,,,, eeeettttcccc....))))
  88.      Below 0.97 _u_l_ps.  Consequently _h_y_p_o_t(5.0,12.0) = 13.0 exactly; in
  89.      general, _h_y_p_o_t and _c_a_b_s return an integer whenever an integer might be
  90.      expected.
  91.  
  92. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  93.      math(3M), sqrt(3M), matherr(3M)
  94.  
  95. AAAAUUUUTTTTHHHHOOOORRRR
  96.      W. Kahan
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.